package com.airticketbooking.service;

import com.airticketbooking.common.domain.PageQuery;
import com.airticketbooking.dto.UserDTO;
import com.airticketbooking.po.User;
import com.airticketbooking.vo.UserPageVO;
import com.github.pagehelper.Page;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;


public interface UserService {

	User getUserByUserName(String userName);

	void add(User user);

	void modify(UserDTO userDTO);

	User getUserById(Integer userId);

	Page<UserPageVO> getUserByPage(PageQuery pageQuery);

	void updatePsw(User user);

	void openOrBanUser(Integer userId);

	void changePassword(@NotBlank(message = "旧密码不能为空") @Size(min = 6, max = 20, message = "密码长度必须在6到20个字符之间") String oldPassword, @NotBlank(message = "新密码不能为空") @Size(min = 6, max = 20, message = "密码长度必须在6到20个字符之间") String newPassword, @NotBlank(message = "新密码不能为空") @Size(min = 6, max = 20, message = "密码长度必须在6到20个字符之间") String rePassword);
}
